import request from '@/axios'
import { SysMachineReportDetailVo, SysMachineReportEditQo, SysMachineReportListVo, SysMachineReportSearchQo } from './types'
import { BaseDeleteQo } from '@/base/api/BaseQo'
import { KeyLabelValueVo } from '@/base/api/KeyLabelValueVo'

export const sysMachineReportPageApi = (data: SysMachineReportSearchQo): Promise<IResponse<Array<SysMachineReportListVo>>> => {
  return request.post({ url: '/sysMachineReport/page.adw', data })
}

export const sysMachineReportDetailApi = (id: number): Promise<IResponse<SysMachineReportDetailVo>> => {
  const data = { id }
  return request.post({
    url: '/sysMachineReport/detail.adw',
    data
  })
}

export const sysMachineReportAddApi = (data: SysMachineReportEditQo): Promise<IResponse<number>> => {
  return request.post({ url: '/sysMachineReport/add.adw', data })
}

export const sysMachineReportUpdateApi = (data: SysMachineReportEditQo): Promise<IResponse<void>> => {
  return request.post({ url: '/sysMachineReport/update.adw', data })
}

export const sysMachineReportDeleteApi = (data: BaseDeleteQo): Promise<IResponse<void>> => {
  return request.post({ url: '/sysMachineReport/delete.adw', data })
}

export const sysMachineLineChartApi=(data: SysMachineReportSearchQo): Promise<IResponse<Array<SysMachineReportListVo>>> => {
  return request.post({ url: '/sysMachineReport/getLineChart.adw', data })
}
// [[ OnflowGenerator Range (- selectFunctions -) Start ]]

// [[ OnflowGenerator Range (- selectFunctions -) End ]]
